{% extends "videos/base.html" %}

{% load i18n %}
{% load humanize %}
{% load tagging_tags %}
{% load wiki %}
{% load markup %}
{% load switchcase %}
{% load restructuredtext %}
{% load comments_tag %}
{% load flagtags %}
{% load flowplayer %}

{% block head_title %}{% blocktrans %}Video Details{% endblocktrans %}{% endblock %}

{% block body %}
  
    <div class="right_panel">
        {% include "videos/video_right_panel.html" %}
    </div>
    
    <h1>{% trans "Video Details" %}</h1>
    
    {% if video %}
       {% if video.video %}
        <div class="gallery-video">
           {% flowplayer video.video.url %}
        </div>
     {% else %}
     <p>The video has not been converted to web format yet, please come back in a couple of minutes </p>  
     <p>If you want to download the original video and watch it locally here is the <a href='{{ video.original_video.url }}'>link</a>
     {% endif %}
        <div class="video-title">
            <h2>{{ video.title }}</h2>
        </div>
        <div class="video-caption">
            <p>{{ video.caption }}</p>
        </div>
        
        <h3>Flag this Video</h3>
        {% flag video request.user.id %} 
        
        <h3>Comments on This Video:</h3>
        {% comments video %}
    {% else %}
    <p>No videos were found.</p>
    {% endif %}
    
{% endblock %}
